import { RouteRecordRaw, createRouter, createWebHashHistory } from "vue-router";
import Welcome from "../pages/Welcome.vue";
import ClusterList from "../pages/clusters/ClusterList.vue";
import RouteList from "../pages/routes/RouteList.vue";
import DestinationList from "../pages/destinations/DestinationList.vue";
import ReverseProxyConfig from "../pages/ReverseProxyConfig.vue";
import ProxyConfigList from '../pages/proxyConfigs/ProxyConfigList.vue';

const routes: RouteRecordRaw[] = [
  {
    path: "/",
    component: Welcome,
  },
  {
    path: "/clusters",
    children: [
      {
        path: "",
        component: ClusterList,
      },
    ],
  },
  {
    path: "/routes",
    children: [
      {
        path: "",
        component: RouteList,
      },
    ],
  },
  {
    path: "/destinations",
    children: [
      {
        path: "",
        component: DestinationList,
      },
    ],
  },
  {
    path: '/reverse-proxy',
    children: [
      {
        path: '',
        component: ProxyConfigList
      }
    ]
  }
];
const routerHistory = createWebHashHistory();

const router = createRouter({
  routes,
  history: routerHistory,
});

export default router;
